class Main {
	String name;
	String sex;
	int age;
	public  Main(String x,String y,int z)
	{
		name=x;
		sex=y;
		age=z;
	}
}
 class Teacher extends Main{
	 String rank;
	 String branch;
	 public Teacher(String x,String y,int z,String n,String m) {
		 super(x,y,z);
		 rank=n;
		 branch=m;
	 }
	 public String toString()
		{
			return name+"  "+sex+"  "+age+"    "+rank+"       "+branch;
		}
 } 
 class Student extends Main{
	String number;
	String time;
	String major;
	 public Student(String x,String y,int z,String n,String m,String p) {
		 super(x,y,z);
		 number=n;
		 time=m;
		 major=p;
}
	 public String toString()
		{
			return name+"  "+sex+"  "+age+"  "+time+"  "+major;
		}
}
public class Main {
	public static void main(String[] args) {
		Student student=new Student("张三","男",20,"01","2019-1-1","网络工程");
		Teacher teacher=new Teacher("李四","女",40,"教授","网络工程系");
		System.out.println(student);
		System.out.println(teacher);
	}
}